﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OgonPhonesXML.Cisco.Serializer
{
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlRootAttribute("CiscoIPPhoneDirectory", Namespace = "", IsNullable = false)]
    public partial class CiscoIPPhoneDirectoryType
    {
        private string titleField;

        private string promptField;

        private CiscoIPPhoneDirectoryEntryType[] directoryEntryField;
        private List<CiscoIPPhoneDirectoryEntryType> listEntryType = new List<CiscoIPPhoneDirectoryEntryType>();

        private CiscoIPPhoneSoftKeyType[] softKeyField;
        private List<CiscoIPPhoneSoftKeyType> listSoftKey = new List<CiscoIPPhoneSoftKeyType>();

        public void addDirectoryEntry(string name, string telephone)
        {
            CiscoIPPhoneDirectoryEntryType psvEntryType = new CiscoIPPhoneDirectoryEntryType();
            psvEntryType.Name = name;
            psvEntryType.Telephone = telephone;
            listEntryType.Add(psvEntryType);
        }
        public void addSoftKey(string name, string url, ushort position)
        {
            CiscoIPPhoneSoftKeyType psvSoftKey = new CiscoIPPhoneSoftKeyType();
            psvSoftKey.Name = name;
            psvSoftKey.URL = url;
            psvSoftKey.Postion = position;
            listSoftKey.Add(psvSoftKey);
        }
        /// <comentarios/>
        [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string Title
        {
            get
            {
                return this.titleField;
            }
            set
            {
                this.titleField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string Prompt
        {
            get
            {
                return this.promptField;
            }
            set
            {
                this.promptField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlElementAttribute("DirectoryEntry", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public CiscoIPPhoneDirectoryEntryType[] DirectoryEntry
        {
            get
            {
                this.directoryEntryField = listEntryType.ToArray();
                return this.directoryEntryField;
            }
            set
            {
                this.directoryEntryField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlElementAttribute("SoftKey")]
        public CiscoIPPhoneSoftKeyType[] SoftKey
        {
            get
            {
                this.softKeyField = listSoftKey.ToArray();
                return this.softKeyField;
            }
            set
            {
                this.softKeyField = value;
            }
        }
    }
}
